home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1993 January
/
1993-01.d64
/
file counter
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
650b
|
25 lines
0 clr
100 data 162,0,142,81,32,142,82,32,142,83,32,232,142,80,32
110 data 32,198,255,32,228,255,141,84,32,165,144,208,37,32,228,255
120 data 238,80,32,208,3,238,81,32,238,82,32,208,3,238,83,32
130 data 205,84,32,240,228,141,84,32,169,0,141,82,32,141,83,32
140 data 240,215,76,204,255
200 for j=8192 to 8259
210 read x:t=t+x
220 poke j,x
230 next j
240 if t<>8286 then stop
300 input "name of file";f$
310 open 15,8,15
320 open 1,8,3,f$
330 input#15,e,e$:if e<>0 then print e$:close 15:stop
340 sys 8192
350 input#15,e,e$,e1,e2:if e<>0 then print e$:close 15:stop
360 close 1:close 15
370 print peek(8272)+peek(8273)*256;"characters"
380 n=peek(8274)+peek(8275)*256
390 print "last";
400 if n>0 then print n+1;"characters: ";
410 if n=0 then print " character: "
420 print peek(8276)